package com.lifeng.consumer;

import com.lifeng.dto.UserDTO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * @author:lifeng
 * @date:2020/7/25 17:00
 */
@Component
@Slf4j
public class MessageReceivedListener {
    /**
     * 监听队列
     * */
    @RabbitListener(queues = "que.sharebill")
    public void onMessage(UserDTO userDTO){
        log.debug("收到数据："+userDTO);
    }
}
